<? $section='Products'; ?>
<?
        require_once 'inc/functions.php';
		require_once('inc/authentication.php');
        $conn = getConnection();
        //print_r($conn);
        $result = $conn->query('SELECT * FROM Proj_Product');
        if(isset($_REQUEST['email']))
                DoLogin($_REQUEST['email'],$_REQUEST['password']);
                
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="inc/site.css" />
<title>Products</title>
</head>

<body>
<? //include("inc/tabs.php"); ?>
<div id="container">
<div id="logo"><img src="logo.png" alt="Logo" height="117" width="619" /></div>
<div id="nav"> 
<ul>
	<li><a href="home.php">Home</a></li>
	<li><a href="products.php">Products</a></li>
	<li><a href="Users/index.php">Users</a></li>
	<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
<div id="content">
<a href="http://www.webdevfoundations.net/scripts/cart.asp?view=yes"><img class="floatright" src="view.jpg" alt="Shopping Cart" width="98px" height="28px" /></a>
<br />
	<h2>Products</h2>
    
<img class="floatright" src="basketball.jpg" alt="Nike Basketball" width="150" height="150">
	
  <p>This NIKE hardcourt basketball is just what you need to play like the pros and it's only $25.99!</p>
  <form method="post" action="http://www.webdevfoundations.net/scripts/cart.asp">
 		<input type="hidden" name="desc1" id="desc1" value="NIKE Basketball" />
 		<input type="hidden" name="cost1" id="cost1" value="25.99" />
 		<input type="submit" value="Add to Cart" />
  </form>
<br /><br /><br /><br /><br /><br />
  
  <img class="floatright" src="shoes.jpg" alt="Shoes" width="150" height="150">
  <p>This pair of NIKE Basketball shoes will give you the edge you need to compete for only $89.99!</p>
  <form method="post" action="http://www.webdevfoundations.net/scripts/cart.asp">
 		<input type="hidden" name="desc1" id="desc1" value="NIKE Shoes" />
 		<input type="hidden" name="cost1" id="cost1" value="89.99" />
 		<input type="submit" value="Add to Cart" />
  </form>
<br /><br /><br /><br /><br /><br />
  
  <img class="floatright" src="shorts.jpg" alt="Shoes" width="150" height="150">
  <p>This pair of NIKE Basketball shorts will give you the comfort and movement you need for only $20.99!</p>
  <form method="post" action="http://www.webdevfoundations.net/scripts/cart.asp">
 		<input type="hidden" name="desc1" id="desc1" value="NIKE Shorts" />
 		<input type="hidden" name="cost1" id="cost1" value="20.99" />
 		<input type="submit" value="Add to Cart" />
  </form>
</div>

<? if(IsLoggedIn()){ ?>
                <h1>You are Logged In</h1>
                <script type="text/javascript">
					function logout(){
						<?php session_destroy();?>
					}
				</script>
                	<form>
                    	<input type="submit" onClick="DoLogOut()" value="Log Out" />
                    </form>
    <? }else{ ?>
        <form method="post">
               <h3>Log In:</h3><input type="email" name="email" autofocus title="Please type you email" />
            <input type="password" name="password" title="Your Passord" />
            <input type="submit" value="Log In" />
        </form>
        <form action="Users/edit.php">
        	<input type="submit" onClick="Users/edit.php" value="Create Account" />
        </form>
    <? } ?>
    
<div id="footer"><i>Copyright &copy; 2011 E-commerce site</i><br />
<a href="mailto:npratt3284@gmail.com">npratt3284@gmail.com</a></div>

</div>

</body>
</html>

<? //$conn->close(); ?>
